<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>WebSocket 测试器</title>
    <link rel="stylesheet" href="static/css/bootstrap.min.css">
</head>

<body>
<div class="container-fluid">
    <h3 class="text-center">WebSocket 连接测试工具</h3>
    <hr>
    <div class="row">
        <div class="col-xs-12">
            <div class="input-group">
                <input id="connect_url" type="text" class="form-control" value="ws://localhost:8080/hd"
                       placeholder="请输入要连接 socket 地址">
                <span class="input-group-btn">
                    <button class="btn btn-success" onclick="connect()" type="button">连接</button>
                    <button class="btn btn-danger" onclick="disConnect()" type="button">断开连接</button>
                </span>
            </div>
        </div>
    </div>
    <hr>
    <div class="row">
        <div class="col-xs-12">
            <h5 class="text-left text-warning">返回消息:<a href="javascript:;" onclick="clearBox()"
                                                       class="text-right text-danger">清空</a></h5>

        </div>
        <div class="col-xs-12">
            <div class="input-group">
                <input disabled id="send_msg" type="text" class="form-control" placeholder="请输入要发送的信息"/>
                <span class="input-group-btn">
                    <button class="btn btn-success" onclick="send()" type="button">发送</button>
                </span>
            </div>
        </div>
        <div class="col-xs-12" style="margin-top: 5px">
            <textarea id="collback_msg" disabled class="form-control" name="" rows="14"></textarea>
        </div>

    </div>
</div>
</body>
<script src="./index.js"></script>
</html>
